package Thread;


class MyThread02 extends Thread{

    private char str;
    private char tmp;
    public MyThread02 (char str){
        this.str = str;
        this.tmp = str;
    }


    @Override
    public void run() {

        while (str <= tmp+25){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName()+":"+str++);
        }

    }

}




public class Test02_Thread02 {
    public static void main(String[] args) {
        MyThread02 t1 = new MyThread02('a');
        MyThread02 t2 = new MyThread02('a');
        t1.start();
        t2.start();
    }
}
